package com.arcsoft.commonbase.utils

import android.text.TextUtils

object UserPasswordUtils {


    //密码必须包含大小写字母，数字和特殊字符（长度6~16位）
    val passwordPattern: String = "^(?=.*[0-9].*)(?=.*[A-Z].*)(?=.*[a-z].*)(?=.*[`~!@#\$%^&*()_\\-+=<>.?:\"{}].*).{6,16}\$"

    fun isMatchComplexPassword(password: String): Boolean {
        return !TextUtils.isEmpty(password) && password.matches(Regex(passwordPattern))
    }
}

